import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取用户任务*/
export const getUserTask = (params: { page: number, pageSize: number , title ?: string , is_finish ?: string}) => {
    return request({
        url: '/api/v2/admin/getUserTask',
        method: 'get',
        params
    })
} 

/**添加用户任务*/
export const addUserTask = (data: addFormData ) => request({
    url: '/api/v2/admin/addUserTask',
    method: 'post',
    data
}) 

/**删除用户任务*/
export const delUserTask = (data: { ID: string }) => request({
    url: '/api/v2/admin/delUserTask',
    method: 'post',
    data
})

/**更新用户任务*/
export const updataUserTask = (data: editFormData) => request({
    url: '/api/v2/admin/updataUserTask',
    method: 'post',
    data
})